<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<form class="form-horizontal">
	<div class="form-group">
		<label class="col-sm-2 control-label">选择人员</label>
		<div class="col-sm-6">
			<input id="userNames" type="text" name="" class="form-control" />
			<input id="userIds" type="hidden"/>
		</div>
		<div class="col-sm-2">
			<button id="selUserBtn" type="button" class="btn btn-primary">选择</button>
		</div>
		<div class="col-sm-2">
			<button type="button" class="btn btn-default">重置</button>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">选择部门</label>
		<div class="col-sm-6">
			<input id="depNames" type="text" name="" class="form-control" />
			<input id="depIds" type="hidden"/>
		</div>
		<div class="col-sm-2">
			<button id="selOrgBtn" type="button" class="btn btn-primary">选择</button>
		</div>
		<div class="col-sm-2">
			<button type="button" class="btn btn-default">重置</button>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">选择角色</label>
		<div class="col-sm-6">
			<input id="roleNames" type="text" name="" class="form-control" />
			<input id="roleIds" type="hidden"/>
		</div>
		<div class="col-sm-2">
			<button id="selRoleBtn" type="button" class="btn btn-primary">选择</button>
		</div>
		<div class="col-sm-2">
			<button type="button" class="btn btn-default">重置</button>
		</div>
	</div>
</form>
<script src="${pageContext.request.contextPath}/scripts/data-selector.js" ></script>
<script type="text/javascript">
$(function() {
	$("#selUserBtn").click(function() {
		dataSelector.open("选择人员",ctxPath + "/auth/orgUserdata!userTree.action","#userIds","#userNames");
	});

	$("#selOrgBtn").click(function() {
		dataSelector.open("选择部门",ctxPath + "/auth/orgUserdata!orgTree.action","#depIds","#depNames");
	});

	$("#selRoleBtn").click(function() {
		dataSelector.open("选择角色",ctxPath + "/auth/orgUserdata!roleTree.action","#roleIds","#roleNames");
	});
});
</script>